<?php
namespace app\admin\validate;

use think\Validate;

class Article extends Validate
{
    protected $rule = [
        'title'  =>  'require|unique:tp_article',//必须跟上数据库名
        'cate_id'=>'require',
        'email'=>'email',
        'link_url'=>'url',
        

    ];


    protected $message  =   [
        'title.require' => '文章标题不能为空',
        'title.unique'     => '文章标题必须唯一',
        'cate_id.require' => '所属栏目不能为空',
        'email.email'=>'eamil格式不符合',
        'link_url.url'=>'url格式不正确',

    ];

}